<?php

namespace common\models\member;

use Yii;

/**
 * This is the model class for table "{{%member_data_personal}}".
 *
 * @property int $id
 * @property int $member_id 会员ID
 * @property string $province 省份
 * @property string $city 地市
 * @property string $district 县区
 * @property string $address_detail 详细地址
 * @property string $area_code 地区码
 * @property string $postal_code 邮编
 * @property string $organization 工作单位/学校
 * @property string $qualification 资格学历
 * @property string $occupation 职业
 * @property int $income 月收入
 * @property int $status 资料状态
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 * @property string $mark 备注
 */
class MemberDataPersonal extends \common\db\ActiveRecord {

    CONST STATUS_ACTIVE = 10;
    CONST STATUS_DEFAULT = 0;

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%member_data_personal}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['member_id', 'income', 'status', 'created_at', 'updated_at'], 'integer'],
            [['province', 'city', 'district', 'organization', 'qualification', 'occupation'], 'string', 'max' => 50],
            [['address_detail', 'mark'], 'string', 'max' => 255],
            [['area_code', 'postal_code'], 'string', 'max' => 6],
            [['address_detail'], 'string', 'max' => 128],
            [['organization', 'qualification'], 'string', 'max' => 50],
            [['occupation', 'mark'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'member_id' => '会员ID',
            'province' => '省份',
            'city' => '地市',
            'district' => '县区',
            'address_detail' => '详细地址',
            'area_code' => '地区码',
            'postal_code' => '邮编',
            'organization' => '工作单位/学校',
            'qualification' => '资格学历',
            'occupation' => '职业',
            'income' => '月收入',
            'status' => '资料状态',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
            'mark' => '备注',
        ];
    }

}
